<?php
// +----------------------------------------------------------------------
// | When work is a pleasure, life is a joy!
// +----------------------------------------------------------------------
// | User: ShouKun Liu  |  Email:24147287@qq.com  | Time:2016/12/26 22:33
// +----------------------------------------------------------------------
// | TITLE: this to do?
// +----------------------------------------------------------------------

namespace Common\Model;


use Think\Model;

class MemberModel extends Model
{
    /**
     * 获取用户
     * @param $userId
     * @return mixed
     */
    public function getUserGroupID($userId)
    {
         $result=$this->alias('m')
           ->field('c.group_id as group_id')
           ->join('left join __AUTH_GROUP_ACCESS__ AS c on c.uid = m.uid')
          ->where(array('m.uid'=>$userId))
           ->find();
        return $result['group_id'];
    }

}